Field of the Invention
The present invention relates to an information processing apparatus, a method of controlling the same, and a non-transitory computer readable medium.
Description of the Related Art
In recent years, in image forming apparatuses, application (hereinafter “app”) operation environments as typified by a Java (registered trademark) environment are provided. With the aim of improving the functions and usability of the image forming apparatus, apps that operate in an environment such as a Java (registered trademark) environment are created, and by installing them in the image forming apparatus, desired functions can be realized. As an app platform, there is OSGi (Open Service Gateway Initiative) which is a Java (registered trademark) app platform directed to embedded devices. In OSGi, a bundle is defined as a software module management unit, and specifications are defined for management of a life cycle comprising install/start/stop/update/uninstall.
Conventionally, in an operating system (OS) that operates in a personal computer (PC) or the like, there are cases in which the system itself crashes, or behavior becomes unstable due to an error in a setting of an app, a driver, or the like. For example, in the case where a plurality of drivers that use the same hardware resources are installed, there is the possibility of falling into these kinds of situations due to contention between drivers over hardware resources upon starting up. Further, the system itself cannot start without cancelling such a state, and so the system falls into a situation from which it cannot be recover.
In order to prevent falling into a situation as described above, an OS comprises a mode (hereinafter referred to as “safe mode”) which is separate from a normal operation mode (hereinafter referred to as “normal mode”) in which the system starts up which comprises only minimum drivers, system services, or the like. By starting up in the safe mode, the driver that is causing the malfunction is deleted, settings of driver, apps, or the like can be changed, and the cause of a system crash, an operation instability or the like can be avoided.
Meanwhile, in embedded devices such as image forming apparatuses, there are cases in which due to a user installing an app, a state of operation instability is fallen into caused by conflict between apps over resources, service registration, and usage order, or the like. As a means of recovery, an arrangement for starting up in a safe mode has been proposed (Japanese Patent Laid-Open No. 2010-009553). However, there is an arrangement in which for types of OSGi bundles there is a host bundle and a fragment bundle, and in a case where these apps are handled, it is necessary to consider restricting to fragment bundles as described below. A fragment bundle is a bundle of a format in which the bundle itself is added (attached) to a class loader space of a host bundle. The fragment bundle does not operate alone, but rather the fragment bundle can also be put into a started state when the host bundle enters a started state. Also, in order to put the fragment bundle in a stopped state, it is necessary to put the host bundle in a stopped state, or to uninstall the fragment bundle. These specifications are required as stipulations of OSGi, and a fragment bundle in a stopped state cannot be installed for a host bundle in a started state.
In the specifications described above, there was the problem that, in a case where there is a problem in the fragment bundle even where there is no problem in the host bundle itself, the starting of the host bundle would fail, and the system could not start normally, and therefore the system would fall into a situation from which it could not recover. For example, there are cases where for a host bundle started upon a safe mode start that is pre-installed in the system, a fragment bundle for which there is a problem is installed by a user.